<style>
.margin-r {margin-right:28px}
body {background:url( {{tomedia(main.lbg,true) || '../core/resource/images/bg-login.jpg'}}) no-repeat #00564b ;background-size: cover;}
.register {
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    background: #fff;
    width: 400px;
    min-width: 310px;
    border-radius: 5px;
    box-shadow: 0 1px 5px 0 rgba(0,0,0,.3);
}
</style>
<div ng-include="sys_html('home/_header',true,true)"></div>
<style>
.top-nav.active {
    background: none;
    box-shadow: 0 0 0;
}
.top-nav.active .cont a {
    color: #fff !important;
}
.footer {
    color: #f2f2f2;
}
.bg01{background:url( {{tomedia(main.lbg,true) || '../core/resource/images/bg-login.jpg'}}) no-repeat #00564b;background-size: cover;}
.bg02{background-color: #18bc9c;}
.bg02 .clouds-container{position:absolute;overflow:hidden;height:100%;width:100%}
.bg02 .clouds{background:url("../core/resource/images/cloud_two.png") repeat-x left 15%;position:absolute;left:0;top:0;height:100%;width:300%;-webkit-animation:cloudmove 200s linear infinite;-moz-animation:cloudmove 200s linear infinite;-o-animation:cloudmove 200s linear infinite;animation:cloudmove 200s linear infinite;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}
.bg02 .clouds-fast{background:url("../core/resource/images/cloud.png") no-repeat 0 40%;-webkit-animation:cloudmove 30s linear infinite;-moz-animation:cloudmove 30s linear infinite;-o-animation:cloudmove 30s linear infinite;animation:cloudmove 30s linear infinite}
.bg02 .clouds-footer{background:url("../core/resource/images/cloud_one.png") no-repeat left 100%;animation:none}
@keyframes cloudmove{0%{left:-50%}100%{left:150%}}
@-moz-keyframes cloudmove{0%{left:-50%}100%{left:150%}}
@-webkit-keyframes cloudmove{0%{left:-50%}100%{left:150%}}
.register{position: relative;z-index:10}
</style>
<div class="register-container container {{main.lbg?'bg01':'bg02'}}" style="height:100%">
		<div ng-if="!main.lbg" class="clouds-container">
			<div class="clouds clouds-footer"></div>
			<div class="clouds"></div>
			<div class="clouds clouds-fast"></div>
		</div>
		<div class="container-index">
		<div style="margin-top: 130px;width:100%;text-align:center">
			<img style="margin:10px auto;width:120px" ng-src="{{tomedia(pagedata.site.llogo) || '../core/resource/images/nologo.png'}}" border="0">
		</div>
        <div ng-class="{'register':1,'margin-r':main.istakeover !=1}">
			<div class="r" style="width:100%" ng-if="pagedata.wxauth!=1 && pagedata.wechat_scan_login">
					<a class="wxlogincode" href="javascript:;" ng-click="pagedata.towechat_scan_login();">
						<img src="../core/resource/images/wxlogincode.png" border="0">
					</a>
					<div class="wxlogintitle">
							<img src="../core/resource/images/diy/icon/wechat.png" ></span>
							<span>微信安全登录</span>
					</div>
			</div>
			<div class="r" style="width:100%" ng-if="pagedata.wxauth==1">
					<a class="wxlogincode" href="javascript:;" ng-click="pagedata.wxauth=0">
						<img src="../core/resource/images/userlogincode.png" border="0">
					</a>
					<div class="wxlogintitle">
							<span>账号密码登录</span>
					</div>
			</div>
			<div class="forminfo" ng-if="pagedata.wxauth!=1">
            <form action="" method="post" role="form" id="form1">
				<div class="form-group fui-tab" ng-if="pagedata.mobile_code">
					<a ng-class="{'disabled':pagedata.item.login_type!=2,'active':pagedata.item.login_type==1}" ng-click="pagedata.item.login_type=1">账号登陆</a>
					<a ng-class="{'disabled':pagedata.item.login_type==2,'active':pagedata.item.login_type==2}" ng-click="pagedata.item.login_type=2">手机登陆</a>
				</div>
				<div class="form-group fui-tab" ng-if="!pagedata.mobile_code">
					<a class="active" ng-click="pagedata.item.login_type=1">账号登陆</a>
					<a class="disabled"></a>
				</div>
				<div style="margin-top:22px;">
					<div ng-show="pagedata.item.login_type==1">
						<div class="form-group">
							<div class="log-form-item">
								<input type="text" ng-model="pagedata.item.name" placeholder="输入您的账号" class="form-control log-input">
								<i class="icon icon-wo1"></i>
							</div>
						</div>
						<div class="form-group">
							<div class="log-form-item">
								<input type="password" ng-model="pagedata.item.password" placeholder="输入您的密码" class="form-control log-input">
								<i class="icon icon-mima"></i>
							</div>	
						</div>
					</div>
					<div class="form-group" ng-show="pagedata.item.login_type==2">
							<div class="log-form-item">
								<input type="text" ng-model="pagedata.item.mobile" placeholder="输入您的手机号" class="form-control log-input">
								<i class="icon icon-shumashouji"></i>
							</div>
					</div>
					<div class="form-group input-group" ng-show="pagedata.verify_code">
							<div class="input-group-addon"><i class="fa fa-info"></i></div>
							<input ng-model="pagedata.item.code" class="form-control" style="width:110px;" placeholder="请输入验证码">
							<a href="javascript:;" id="code" ng-click="code_image('imgverify')" style="text-decoration: none"><img id="imgverify" src="../core/resource/images/no_imgcode.png" style="height:44px;" title="点击图片更换验证码"/></a>
					</div>
					<div class="form-group input-group" ng-show="pagedata.item.login_type==2">
								<div class="input-group-addon"><i class="fa fa-info"></i></div>
								<input ng-model="pagedata.item.smscode" class="form-control" style="width:110px;" placeholder="请输入验证码">
								<a class="jy-btn jy-btn-default" href="javascript:;" id="sms_code" ng-click="tool.mobile_code({'mobile':pagedata.item.mobile,'imgcode':pagedata.item.code,'check_imgcode':pagedata.verify_code})" style="text-decoration: none;margin:2px 10px;padding:10px 12px">发送验证码</a>
					</div>
					<div class="form-group" ng-init="code_image('imgverify',true)">
						<div id="submit" style="text-align:center;" ng-click="pagedata.login()" class="login-btn">登录平台</div>
					</div>
				</div>
            </form>
			</div>
			<div class="forminfo" ng-if="pagedata.wxauth==1">
				<div class="form-group log-qrcode-cont" style="margin-top:50px">
					<div class="wap-qrcode-image" id="login_ewm" style="width:160px;margin:0 auto">
					</div>
					<div class="text"><i class="icon icon-saoyisao1"></i> 打开微信，扫一扫登录</div>
				</div>
			</div>
			<div class="other-login-line" style="background:#fcfcfc;border-top: 1px solid #f4f4f4;border-bottom-left-radius:5px;border-bottom-right-radius:5px">
				<div ng-if="pagedata.zhuce.demoname" style="padding-top:15px;text-align:center">演示账号：{{pagedata.zhuce.demoname}}，密码：{{pagedata.zhuce.demopwd}}</div>
				<div class="fui-cellone" style="padding:15px 18px;{{pagedata.zhuce.demoname?'padding-top:5px;':''}}">
						<div ng-show="pagedata.qq_login" class="fui-cellone-label" style="padding-right:20px">
						<img src="../core/resource/images/icon/qq.png" style="width:22px;height:22px"/>
						<a style="line-height:22px" href="javascript:;" ng-click="access_json('core/user.login_domain/qq_login/')">QQ</a>
						</div>
						<div ng-show="pagedata.wechat_login==1" class="fui-cellone-label" style="padding-right:20px">
						<img src="../core/resource/images/icon/wechat.png" style="width:22px;height:22px"/>
						<a style="line-height:22px" href="javascript:;" ng-click="access_json('core/user.login_domain/wechat_login/')">微信</a>
						</div>
						<div ng-show="pagedata.wechat_login!=1 && pagedata.wechat_scan_login==1" class="fui-cellone-label" style="padding-right:20px">
						<img src="../core/resource/images/icon/wechat.png" style="width:22px;height:22px"/>
						<a style="line-height:22px" href="javascript:;" ng-click="pagedata.towechat_scan_login();">微信</a>
						</div>
						<div ng-show="pagedata.wxwork_scan_login" class="fui-cellone-label">
						<img src="../core/resource/images/icon/qq.png" style="width:22px;height:22px"/>
						<a style="line-height:22px" href="javascript:;" ng-click="access_json(pagedata.wxwork_scan_login)">企业微信</a>
						</div>
						<div class="fui-cellone-info"></div>
						<div class="fui-cellone-remark">
							<a ng-if="pagedata.zhuce.open==1" class="action" href="javascript:;" ng-click="access_json('/user.register/')"><i class="fa fa-chevron-circle-right syscolor" style="font-size:16px"> 去注册</i></a>
							<a ng-if="pagedata.zhuce.open!=1" class="action" href="javascript:;"><i class="fa fa-clock-o gray" style="font-size:16px"> 未开放注册</i></a>
						</div>
					</div>
			</div>
        </div>
    </div>
</div>
<div ng-include="sys_html('home/_footer_domain',true)"></div>
<script>
scope.main.istakeover=1
scope.pagedata.towechat_scan_login=function(){
	var url=scope.tool.manage_url('core/user.login/wxauth_check/session_id='+scope.pagedata.session_id,true);
	scope.tool.qr(url,'login_ewm');
	scope.pagedata.wxauth=1;
	setTimeout(function(){
		scope.pagedata.pc_uplogin(1);
	},5000);
	return '';
	scope.tool.wechat_login(function(res){
		if(!res.message || !res.message.openid){
			scope.message('获取openid失败，微信登陆失败！');
		}
		if(res.to_uid==scope.pagedata.session_id){
			scope.pagedata.item.openid=res.message.openid;
			scope.post(scope.pagedata.item,'core/user.login/wechat_scan_login/');
		}
	});
}
scope.pagedata.login=function(){
	scope.post(scope.pagedata.item,'core/user.login_domain/login/');
}
scope.pagedata.pc_uplogin=function(is1){
	var is1=is1?is1:'';
	scope.get('core/user.login/pc_uplogin/is1='+is1+'&session_id='+scope.pagedata.session_id,function(res){
		//console.log(res);
		if(res.id && res.openid){
			scope.pagedata.item.openid=res.openid;
			scope.post(scope.pagedata.item,'core/user.login/wechat_scan_login/');
		}else{
			setTimeout(function(){
				if(!scope.pagedata.item.openid && scope.page.action=='user.login' && scope.pagedata.wxauth==1){
					scope.pagedata.pc_uplogin();
				}
			},2000);
		}
	});
}
$("body").keydown(function () {
	if (window.event.keyCode==13) {
		scope.pagedata.login();
	}
});
</script>